﻿
<div id="layout-goods" class="easyui-layout" style="width: 100%; height: 100%">
    <div data-options="region:'west',split:true,border:false" title="物品类别" style="width: 170px;border-right-width:1px;">
        <ul id="goodsClassTree">
        </ul>
    </div>
    <div data-options="region:'center',border:false" style="border-left-width:1px;">

    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#goodsClassTree').tree({
            url: "/Goods/GoodsClassForTree",
            onClick: function (node) {
                
                if ($('#dd').find("#goodsfm").length > 0) {

                    $('#dd').dialog("destroy");//新摧毁旧窗体
                }
                $("#layout-goods").layout("panel", "center").panel('refresh', '/Goods/GoodsList?classid=' + node.id);
            },
            onLoadSuccess: function (node, data) {
                if (node == null) {
                    $("#layout-goods").layout("panel", "center").panel("refresh", "/Blank/Index?msg=" + escape("请选择物品类别"));
                }
            }
        });
    });
</script>